Integrand size = 25, antiderivative size = 149 \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {\arctan \left (\frac {\sqrt {i a-b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{\sqrt {i a-b} d}+\frac {\text {arctanh}\left (\frac {\sqrt {i a+b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{\sqrt {i a+b} d} \]
arctan((I*a-b)^(1/2)*tan(d*x+c)^(1/2)/(a+b*tan(d*x+c))^(1/2))*cot(d*x+c)^( 1/2)*tan(d*x+c)^(1/2)/d/(I*a-b)^(1/2)+arctanh((I*a+b)^(1/2)*tan(d*x+c)^(1/ 2)/(a+b*tan(d*x+c))^(1/2))*cot(d*x+c)^(1/2)*tan(d*x+c)^(1/2)/d/(I*a+b)^(1/ 2)
Time = 0.17 (sec) , antiderivative size = 144, normalized size of antiderivative = 0.97 \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\frac {(-1)^{3/4} \left (-\frac {\arctan \left (\frac {\sqrt [4]{-1} \sqrt {-a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {-a+i b}}-\frac {\arctan \left (\frac {\sqrt [4]{-1} \sqrt {a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {a+i b}}\right ) \sqrt {\cot (c+d x)} \sqrt {\tan (c+d x)}}{d} \]
((-1)^(3/4)*(-(ArcTan[((-1)^(1/4)*Sqrt[-a + I*b]*Sqrt[Tan[c + d*x]])/Sqrt[ a + b*Tan[c + d*x]]]/Sqrt[-a + I*b]) - ArcTan[((-1)^(1/4)*Sqrt[a + I*b]*Sq rt[Tan[c + d*x]])/Sqrt[a + b*Tan[c + d*x]]]/Sqrt[a + I*b])*Sqrt[Cot[c + d* x]]*Sqrt[Tan[c + d*x]])/d
Time = 0.46 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.85, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3042, 4729, 3042, 4058, 615, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}}dx\) |
\(\Big \downarrow \) 4729 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}}dx\) |
\(\Big \downarrow \) 4058 |
\(\displaystyle \frac {\sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \frac {1}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)} \left (\tan ^2(c+d x)+1\right )}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 615 |
\(\displaystyle \frac {\sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \int \left (\frac {i}{2 (i-\tan (c+d x)) \sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}}+\frac {i}{2 \sqrt {\tan (c+d x)} (\tan (c+d x)+i) \sqrt {a+b \tan (c+d x)}}\right )d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\sqrt {\tan (c+d x)} \sqrt {\cot (c+d x)} \left (\frac {\arctan \left (\frac {\sqrt {-b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {-b+i a}}+\frac {\text {arctanh}\left (\frac {\sqrt {b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{\sqrt {b+i a}}\right )}{d}\) |
((ArcTan[(Sqrt[I*a - b]*Sqrt[Tan[c + d*x]])/Sqrt[a + b*Tan[c + d*x]]]/Sqrt [I*a - b] + ArcTanh[(Sqrt[I*a + b]*Sqrt[Tan[c + d*x]])/Sqrt[a + b*Tan[c + d*x]]]/Sqrt[I*a + b])*Sqrt[Cot[c + d*x]]*Sqrt[Tan[c + d*x]])/d
3.9.63.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(c + d*x)^n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n}, x] && ILtQ[p, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S imp[ff/f Subst[Int[(a + b*ff*x)^m*((c + d*ff*x)^n/(1 + ff^2*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a *d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
Int[(cot[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Simp[(c*Cot[a + b*x])^m*(c*Tan[a + b*x])^m Int[ActivateTrig[u]/(c*Tan[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] && !IntegerQ[m] && KnownTangentIntegrandQ[u, x]
Leaf count of result is larger than twice the leaf count of optimal. \(760\) vs. \(2(121)=242\).
Time = 40.83 (sec) , antiderivative size = 761, normalized size of antiderivative = 5.11
method | result | size |
default | \(-\frac {\sin \left (d x +c \right ) \left (2 \sqrt {-b +\sqrt {a^{2}+b^{2}}}\, \arctan \left (\frac {\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \cos \left (d x +c \right )-\sqrt {-\frac {2 \left (\left (\cos ^{2}\left (d x +c \right )\right ) b -\sin \left (d x +c \right ) \cos \left (d x +c \right ) a -b \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sin \left (d x +c \right )-\sqrt {b +\sqrt {a^{2}+b^{2}}}}{\left (\cos \left (d x +c \right )-1\right ) \sqrt {-b +\sqrt {a^{2}+b^{2}}}}\right )+\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \ln \left (\frac {\cos \left (d x +c \right ) \cot \left (d x +c \right ) a -2 a \cot \left (d x +c \right )+2 \sin \left (d x +c \right ) \sqrt {\csc \left (d x +c \right ) \left (\left (\cot ^{2}\left (d x +c \right )\right ) a -2 \cot \left (d x +c \right ) \csc \left (d x +c \right ) a +\left (\csc ^{2}\left (d x +c \right )\right ) a -2 b \csc \left (d x +c \right )+2 \cot \left (d x +c \right ) b -a \right ) \left (\cos \left (d x +c \right )-1\right )}\, \sqrt {b +\sqrt {a^{2}+b^{2}}}+2 \sqrt {a^{2}+b^{2}}\, \cos \left (d x +c \right )+2 b \cos \left (d x +c \right )-\sin \left (d x +c \right ) a +\csc \left (d x +c \right ) a -2 \sqrt {a^{2}+b^{2}}-2 b}{\cos \left (d x +c \right )-1}\right )-2 \sqrt {-b +\sqrt {a^{2}+b^{2}}}\, \arctan \left (\frac {\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \cos \left (d x +c \right )+\sqrt {-\frac {2 \left (\left (\cos ^{2}\left (d x +c \right )\right ) b -\sin \left (d x +c \right ) \cos \left (d x +c \right ) a -b \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sin \left (d x +c \right )-\sqrt {b +\sqrt {a^{2}+b^{2}}}}{\left (\cos \left (d x +c \right )-1\right ) \sqrt {-b +\sqrt {a^{2}+b^{2}}}}\right )-\sqrt {b +\sqrt {a^{2}+b^{2}}}\, \ln \left (\frac {\cos \left (d x +c \right ) \cot \left (d x +c \right ) a -2 a \cot \left (d x +c \right )-2 \sin \left (d x +c \right ) \sqrt {\csc \left (d x +c \right ) \left (\left (\cot ^{2}\left (d x +c \right )\right ) a -2 \cot \left (d x +c \right ) \csc \left (d x +c \right ) a +\left (\csc ^{2}\left (d x +c \right )\right ) a -2 b \csc \left (d x +c \right )+2 \cot \left (d x +c \right ) b -a \right ) \left (\cos \left (d x +c \right )-1\right )}\, \sqrt {b +\sqrt {a^{2}+b^{2}}}+2 \sqrt {a^{2}+b^{2}}\, \cos \left (d x +c \right )+2 b \cos \left (d x +c \right )-\sin \left (d x +c \right ) a +\csc \left (d x +c \right ) a -2 \sqrt {a^{2}+b^{2}}-2 b}{\cos \left (d x +c \right )-1}\right )\right ) \left (\sqrt {\cot }\left (d x +c \right )\right ) \sqrt {a +b \tan \left (d x +c \right )}}{2 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {2 \left (\left (\cos ^{2}\left (d x +c \right )\right ) b -\sin \left (d x +c \right ) \cos \left (d x +c \right ) a -b \right )}{\left (\cos \left (d x +c \right )+1\right )^{2}}}\, \sqrt {a^{2}+b^{2}}}\) | \(761\) |
-1/2/d*sin(d*x+c)*(2*(-b+(a^2+b^2)^(1/2))^(1/2)*arctan(((b+(a^2+b^2)^(1/2) )^(1/2)*cos(d*x+c)-(-2*(cos(d*x+c)^2*b-sin(d*x+c)*cos(d*x+c)*a-b)/(cos(d*x +c)+1)^2)^(1/2)*sin(d*x+c)-(b+(a^2+b^2)^(1/2))^(1/2))/(cos(d*x+c)-1)/(-b+( a^2+b^2)^(1/2))^(1/2))+(b+(a^2+b^2)^(1/2))^(1/2)*ln((cos(d*x+c)*cot(d*x+c) *a-2*a*cot(d*x+c)+2*sin(d*x+c)*(csc(d*x+c)*(cot(d*x+c)^2*a-2*cot(d*x+c)*cs c(d*x+c)*a+csc(d*x+c)^2*a-2*b*csc(d*x+c)+2*cot(d*x+c)*b-a)*(cos(d*x+c)-1)) ^(1/2)*(b+(a^2+b^2)^(1/2))^(1/2)+2*(a^2+b^2)^(1/2)*cos(d*x+c)+2*b*cos(d*x+ c)-sin(d*x+c)*a+csc(d*x+c)*a-2*(a^2+b^2)^(1/2)-2*b)/(cos(d*x+c)-1))-2*(-b+ (a^2+b^2)^(1/2))^(1/2)*arctan(((b+(a^2+b^2)^(1/2))^(1/2)*cos(d*x+c)+(-2*(c os(d*x+c)^2*b-sin(d*x+c)*cos(d*x+c)*a-b)/(cos(d*x+c)+1)^2)^(1/2)*sin(d*x+c )-(b+(a^2+b^2)^(1/2))^(1/2))/(cos(d*x+c)-1)/(-b+(a^2+b^2)^(1/2))^(1/2))-(b +(a^2+b^2)^(1/2))^(1/2)*ln((cos(d*x+c)*cot(d*x+c)*a-2*a*cot(d*x+c)-2*sin(d *x+c)*(csc(d*x+c)*(cot(d*x+c)^2*a-2*cot(d*x+c)*csc(d*x+c)*a+csc(d*x+c)^2*a -2*b*csc(d*x+c)+2*cot(d*x+c)*b-a)*(cos(d*x+c)-1))^(1/2)*(b+(a^2+b^2)^(1/2) )^(1/2)+2*(a^2+b^2)^(1/2)*cos(d*x+c)+2*b*cos(d*x+c)-sin(d*x+c)*a+csc(d*x+c )*a-2*(a^2+b^2)^(1/2)-2*b)/(cos(d*x+c)-1)))*cot(d*x+c)^(1/2)*(a+b*tan(d*x+ c))^(1/2)/(cos(d*x+c)+1)/(-2*(cos(d*x+c)^2*b-sin(d*x+c)*cos(d*x+c)*a-b)/(c os(d*x+c)+1)^2)^(1/2)/(a^2+b^2)^(1/2)
Leaf count of result is larger than twice the leaf count of optimal. 4089 vs. \(2 (117) = 234\).
Time = 0.71 (sec) , antiderivative size = 4089, normalized size of antiderivative = 27.44 \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\text {Too large to display} \]
1/8*sqrt(((a^2 + b^2)*d^2*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + b)/(( a^2 + b^2)*d^2))*log(1/2*((2*(a^3*b^3 + 4*a*b^5)*d*tan(d*x + c)^2 + 2*(a^6 + 5*a^4*b^2 + 8*a^2*b^4)*d*tan(d*x + c) + 2*(a^5*b + 2*a^3*b^3)*d - ((a^7 + 8*a^5*b^2 + 19*a^3*b^4 + 12*a*b^6)*d^3*tan(d*x + c)^2 + 2*(a^6*b + 2*a^ 4*b^3 - 3*a^2*b^5 - 4*b^7)*d^3*tan(d*x + c) - (a^7 + 4*a^5*b^2 + 7*a^3*b^4 + 4*a*b^6)*d^3)*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)))*sqrt(((a^2 + b^ 2)*d^2*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + b)/((a^2 + b^2)*d^2)) + 2*((a^5 + 3*a^3*b^2 + 4*a*b^4)*tan(d*x + c)^2 + 2*(a^4*b + 2*a^2*b^3)*tan( d*x + c) - (2*(a^5*b + 3*a^3*b^3 + 2*a*b^5)*d^2*tan(d*x + c)^2 - (a^6 + 4* a^4*b^2 + 7*a^2*b^4 + 4*b^6)*d^2*tan(d*x + c))*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)))*sqrt(b*tan(d*x + c) + a)/sqrt(tan(d*x + c)))/(tan(d*x + c)^ 2 + 1)) + 1/8*sqrt(((a^2 + b^2)*d^2*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4 )) + b)/((a^2 + b^2)*d^2))*log(-1/2*((2*(a^3*b^3 + 4*a*b^5)*d*tan(d*x + c) ^2 + 2*(a^6 + 5*a^4*b^2 + 8*a^2*b^4)*d*tan(d*x + c) + 2*(a^5*b + 2*a^3*b^3 )*d - ((a^7 + 8*a^5*b^2 + 19*a^3*b^4 + 12*a*b^6)*d^3*tan(d*x + c)^2 + 2*(a ^6*b + 2*a^4*b^3 - 3*a^2*b^5 - 4*b^7)*d^3*tan(d*x + c) - (a^7 + 4*a^5*b^2 + 7*a^3*b^4 + 4*a*b^6)*d^3)*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)))*sqrt (((a^2 + b^2)*d^2*sqrt(-a^2/((a^4 + 2*a^2*b^2 + b^4)*d^4)) + b)/((a^2 + b^ 2)*d^2)) + 2*((a^5 + 3*a^3*b^2 + 4*a*b^4)*tan(d*x + c)^2 + 2*(a^4*b + 2*a^ 2*b^3)*tan(d*x + c) - (2*(a^5*b + 3*a^3*b^3 + 2*a*b^5)*d^2*tan(d*x + c)...
\[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\int \frac {\sqrt {\cot {\left (c + d x \right )}}}{\sqrt {a + b \tan {\left (c + d x \right )}}}\, dx \]
\[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\int { \frac {\sqrt {\cot \left (d x + c\right )}}{\sqrt {b \tan \left (d x + c\right ) + a}} \,d x } \]
Exception generated. \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(con st gen &
Timed out. \[ \int \frac {\sqrt {\cot (c+d x)}}{\sqrt {a+b \tan (c+d x)}} \, dx=\int \frac {\sqrt {\mathrm {cot}\left (c+d\,x\right )}}{\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}} \,d x \]